import { request } from '@umijs/max';
export const uploadFileBySys = (
  fileData: Record<string, string | File>,
  options: ProgressTypes = {},
) => {
  const data = new FormData();
  Object.keys(fileData).forEach((key: string) => {
    data.append(key, fileData[key]);
  });
  return request('/sys/common/uploadFile', {
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    transformRequest: [
      function (data) {
        return data;
      },
    ],
    ...options,
    data,
  })
}